$(function() {
    //先去逛逛
    $(".look").on("click",function() {
        location.href = "../../index.html";
    })
    $(".loginBtn").on("click",function(){
        //获取用户名和密码
        var userName = $(".loginName").val();
        var password = $(".psd").val();
        $.ajax({
            type: "post",
            url: domain.test + "/getlogin",
            data: {
                userName:userName,
                password:password,
                pushId:"sir555",
                os:"iOS"
            },
            dataType:"json",
            success: function (response) {
               if(response.data.rtnCode===200) {
                   var userData = response.data.data;
                   console.log(userData);
                   localStorage.token = userData.token;
                   localStorage.userHeadPic = userData.pic;
                   localStorage.userName = userData.userName;
                   location.href = "../me/me.html";
               }
            }
        });
    });
});